package com.ws.action;

import com.ws.dao2.OrderTransactionDao;
import com.ws.domain.dto.OrderTransaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;


/**
 * Created by WS on 2017/10/24.
 */

@RestController
@RequestMapping("/orderTransactions")
public class OrderTransactionController {
    @Autowired
    private OrderTransactionDao orderTransactionDao;

    @GetMapping
    public Page getOrderTransactionPage(OrderTransaction orderTransaction){
        Pageable pageable = new PageRequest(1,3);
       return orderTransactionDao.getPage(orderTransaction,pageable);
    }


}
